$(document).ready(function(){
	$("#login-form").submit(function(){
		event.preventDefault();
		$.ajax({
			url: 'index/auth',
			type: 'POST',
			data: { username : $("#username").val(), password : $("#password").val() }, 
			success: 
				function(result){
					if(result != ""){
						alert(result);
						$("#notify").css('color','red');
					} else {
						location.reload();
					}
				}
		});
	});
});